package deibay.client;

import deibay.client.core.views.IShowMessageView;
import deibay.client.core.views.IView;
import deibay.client.core.views.IViewLogin;
import deibay.client.core.views.IViewRegister;

/**
 * @author  Joel Cordeiro
 */
public abstract class Controller {

	protected IView view = null;
	protected IModel model = null;
	protected IViewLogin loginView = null;
	protected IViewRegister registerView = null;
	protected IShowMessageView showMessage = null;
	
	protected SellerController sellerController = null;
	protected BidderController bidderController = null;	
	
	
	public Controller(IView view, IModel model)
	{
		this.view = view;
		this.model = model;
		initModel();
		initView();
		createViewEvents();
	}
	
	public abstract void initView();
	public abstract void initModel();
	public abstract void createViewEvents();	
	public abstract void showLoginView();
	public abstract void showRegisterView();
	
	public abstract void logged();
	public abstract void logout();
	public abstract void login();
	public abstract void register();
	
	public abstract void setBidderController();
	public abstract void setSellerController();	
	

	public abstract void setLoggedState();
	public abstract void setLoggoutState();
	/**
	 * @return
	 */
	public SellerController getSellerController()
	{
		return this.sellerController;
	}
	
	/**
	 * @return
	 */
	public BidderController getBidderController()
	{
		return this.bidderController;
	}	
	
	/**
	 * @return
	 */
	public IShowMessageView getShowMessage()
	{
		return this.showMessage;		
	}
	
	/**
	 * @return
	 */
	public IModel getModel() {
		return model;
	}

	/**
	 * @return
	 */
	public IView getView() {
		return view;
	}
	
}

